import { forwardRef, Module } from '@nestjs/common';
import { EventToPlayerService } from './event-to-player.service';
import { EventToPlayerController } from './event-to-player.controller';
import { EventToPlayer } from './entities/event-to-player.entity';
import { TypeOrmModule } from '@nestjs/typeorm';
import { ConfirmPlayerE2PService } from './services/confirmPlayerE2P.service';
import { EventModule } from '../event/event.module';
import { MatchModule } from '../match/match.module';
import { PlayerSignupModule } from '../player-signup/player-signup.module';
import { BindPlayerService } from './services/bingPlayer.service';
import { EventToPlayerCacheService } from './event-to-player.cache.service';

@Module({
  imports: [
    TypeOrmModule.forFeature([EventToPlayer]),
    EventModule,
    forwardRef(() => MatchModule),
    forwardRef(() => PlayerSignupModule),
  ],
  controllers: [EventToPlayerController],
  providers: [
    EventToPlayerService,
    ConfirmPlayerE2PService,
    BindPlayerService,
    EventToPlayerCacheService,
  ],
  exports: [
    EventToPlayerService,
    ConfirmPlayerE2PService,
    BindPlayerService,
    EventToPlayerCacheService,
  ],
})
export class EventToPlayerModule {}
